<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
	xmlns:f="http://xmlns.jcp.org/jsf/core"
	xmlns:h="http://xmlns.jcp.org/jsf/html"
	xmlns:p="http://primefaces.org/ui"
	template="/WEB-INF/templates/public/default.xhtml"
>

	<f:metadata>
		<f:viewParam
			name="articleId"
			value="#{articleHome.id}"
		></f:viewParam>		
		<f:event listener="#{articleHome.initConversation()}" type="preRenderView" />
	</f:metadata>

	<ui:define name="head">
		<h:outputStylesheet name="css/public/iconfont3.css" />
		<h:outputStylesheet name="css/public/first-pagemain.css" />
		<style type="text/css">
			.Methbox_con p {
			    font-size: 16px;
			    line-height: 30px;
			    text-indent: 0em;
			    color: #333333;
			    margin-bottom: 10px;
			}
			
		</style>		
	</ui:define>

	<ui:define name="content">
		<h:form>
			<!--招标公告-->
			<div class="sub_wrap">
				<div class="Methbox_tit">
					<h2>#{articleHome.instance.category.name}</h2>
				</div>
				<div class="Methbox_con">				
					<div class="sub_view">
						<h2 style="color:#{articleHome.instance.color}">#{articleHome.instance.title}</h2>
						<div class="view_dem">
							<div class="fleft">
								<p:outputLabel value="发布人："></p:outputLabel>
								<span class="blue">
									<h:outputText value="#{articleHome.instance.publisher}" />
								</span>
							</div>
							<div class="fright">
								<p:outputLabel value="发布日期："></p:outputLabel>							
								<h:outputText value="#{articleHome.instance.createDate}">
									<f:convertDateTime pattern="yyyy-MM-dd"/>
								</h:outputText>
							</div>
						</div>
					</div>
					<div class="articleContent">
						<h:outputText value="#{articleHome.instance.articleData.content}" escape="false" />
					</div>
					<div class="attachments">
						<ul style="text-decoration: underline">
							<p:repeat var="_attr" value="#{articleHome.instance.attachment}" varStatus="_status">
								<li>
									<p:commandLink value="#{_status.index + 1}、#{_attr.filename}" ajax="false">
								        <p:fileDownload value="#{attachments.attr}">
								        	<f:param name="id" value="#{_attr.id}"></f:param>
								        </p:fileDownload>
								        <f:param name="id" value="#{_attr.id}"></f:param>
								    </p:commandLink>
								</li>
							</p:repeat>
						</ul> 
					</div>
				</div>
			</div>
		</h:form>
	</ui:define>
</ui:composition>